:root {
    --primary-color: #e74c3c;
    --secondary-color: #2ecc71;
    --background-color: #f9f9f9;
    --text-color: #333;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 2rem;
}

.title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.title-title {
    font-size: 2.5rem;
    text-align: center;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    line-height: 1.2;
}

.title-icon {
    width: min(100%, 400px);
    height: auto;
    filter: drop-shadow(0 0 5px rgba(255, 165, 0, 0.6));
}

@media (max-width: 768px) {
    .title-title {
        font-size: 1.8rem;
        order: 2;
        width: 100%;
    }
    
    .title-icon {
        width: min(100%, 200px);
        order: 1;
    }
    
    .container {
        padding: 1rem;
    }
}
.title-image {
    max-width: 350px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(255, 165, 0, 0.6));
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 2rem;
    position: relative;
}

.loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: none;
    justify-content: center;
    align-items: center;
    border-radius: 20px;
    z-index: 100;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #c0392b);
    transition: width 0.3s ease;
}

.score-board {
    background: linear-gradient(45deg, var(--primary-color), #c0392b);
    color: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.5rem;
    margin: 1rem auto;
    width: fit-content;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.riddle-container {
    position: relative;
    margin: 2rem 0;
    padding: 1rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.riddle-image {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0 auto;
    border: 3px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.input-group {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin: 2rem 0;
    flex-wrap: wrap;
}

#actionButton {
    min-width: 120px;  /* 保持按钮宽度一致 */
    transition: all 0.3s ease;
}

#answer {
    flex: 1;
    max-width: 400px;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    min-height: 44px;
}

button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(45deg, var(--primary-color), #c0392b);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    min-height: 44px;
    min-width: 120px;
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 1rem;
    }
    
    .container {
        max-width: 95%;
        padding: 1.5rem;
    }
    
    .riddle-image {
        max-width: 100%;
    }
}
